<!DOCTYPE html>
<span></span>
<div id="div">Text</div>
<span id="span"></span>
<p>crbug.com/585704: Should not ASSERT or crash.</p>
<script>
    if (window.testRunner)
        testRunner.dumpAsText();
    document.getElementById('div').parentNode.style.display = "table-row-group"
    document.body.offsetTop;
    document.getElementById('span').style.display = "table-row"
</script>
